#!/bin/bash

### This script will execute the R files to make yearly measures of extreme events
### Written for Climate, Disasters, and Human Responses project
### Aiden Jönsson, 30 September 2019

## Make yearly magnitude records for the accumulated precipitation extremes: high
Rscript MakeYearlyRecord_spi6_pctl84.r
Rscript MakeYearlyRecord_spi6_pctl93.r
Rscript MakeYearlyRecord_spi6_pctl98.r

## Make yearly magnitude records for the accumulated precipitation extremes: low
Rscript MakeYearlyRecord_spi6_pctl16.r
Rscript MakeYearlyRecord_spi6_pctl07.r
Rscript MakeYearlyRecord_spi6_pctl02.r

## Move finished data to the storage directory
mv CDHR2019* SOME_STORAGE_DIR
